import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/all',
    name: 'all',
    component: () => import( '../views/all/all.vue'),
    children:[
       {
        path: '/all/home',
        component: () => import( '../views/all/home/home.vue'),
       },
       {
        path: '/all/classfil',
        component: () => import( '../views/all/classfil/classfil.vue'),
       },
       {
        path: '/all/shop',
        component: () => import( '../views/all/shop/shop.vue'),
       },
       {
        path: '/all/my',
        component: () => import( '../views/all/my/my.vue'),
       },
       {
        path:'/all',
        redirect:"/all/home"
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import( '../views/login/login.vue')
  },
  {
    path: '/deil',
    name: 'deil',
    component: () => import( '../views/deil/deil.vue')
  },
  {
    path:'/',
    redirect:"/all"
  }
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
